<div id="preview_page_<%= edit_page.id %>"></div>

<% form_remote_for :page, edit_page, 
	{
		:loading => "$('edit_indicator_#{edit_page.id}').show()",
		:complete => "$('edit_indicator_#{edit_page.id}').hide()",
		:url => { :action => :remote_save_edit, :id => edit_page },
		:html => { :id => "edit_page_#{edit_page.id}" }
	} do |f| -%>	
	
	<label for="page_title">Title:</label><br />
	<%= f.text_field :title, :class => 'fixed' %><br />
	
	<label for="page_raw_text">Raw Text:</label><br />
	<%= f.text_area :raw_text, :cols => '80', :rows => '25', :class => 'fixed' %><br />
	
	<%= submit_tag 'Save', :class => 'submit' %>
	<%= submit_to_remote 'Preview', 'Preview', 
	{
		:loading => "$('edit_indicator_#{edit_page.id}').show()",
		:complete => "$('edit_indicator_#{edit_page.id}').hide()", 
		:url => { :action => :remote_edit_preview, :id => edit_page } 
	} %>
	or <%= link_to_function 'cancel', "Page.hideEdit(#{edit_page.id})" %>
	<%= image_tag 'spinner.gif', :size => '16x16', :alt => "Please wait...", :style => 'display: none', :id => "edit_indicator_#{edit_page.id}", :class => 'middle' %>
	
<% end -%>